<div>
	<yu-panel title="导入日志管理">
		<yu-xform related-table-name="refTable" form-type="search" v-model="searchFormdata">
			<yu-xform-group :column="3">
				<yu-xform-item label="ID" placeholder="导入ID" ctype="input" name="id"></yu-xform-item>
				<yu-xform-item label="导入类型" placeholder="导入类型" ctype="select" name="impType" data-code="IMP_TYPE"></yu-xform-item>
				<yu-xform-item label="导入渠道" placeholder="导入渠道" ctype="select" name="impChanel" data-code="IMP_CHANEL"></yu-xform-item>
				<yu-xform-item label="导入状态" placeholder="导入状态" ctype="select" name="impStatus" data-code="IMP_STATUS"></yu-xform-item>
				<!-- <yu-xform-item label="开始时间" placeholder="导入状态" ctype="custom" name="startDateTime">
					<yu-date-picker type="datetime" placeholder="选择日期时间" v-model="startDateTime" @change="startDateTimeChange" value-format="yyyy-MM-dd HH:mm:ss"></yu-date-picker>
				</yu-xform-item>
				<yu-xform-item label="结束时间" placeholder="导入状态" ctype="custom" name="endDateTime">
					<yu-date-picker type="datetime" placeholder="选择日期时间" v-model="endDateTime" @change="endDateTimeChange" value-format="yyyy-MM-dd HH:mm:ss"></yu-date-picker>
				</yu-xform-item> -->
				<yu-xform-item label="开始时间" placeholder="开始时间" ctype="datepicker" name="startDateTime"> </yu-xform-item>
				<yu-xform-item label="结束时间" placeholder="结束时间" ctype="datepicker" name="endDateTime"> </yu-xform-item>
			</yu-xform-group>
		</yu-xform>
		<yu-toolBar>
			<yu-button @click="importFlowFn" v-if="importFnButton">excel导入</yu-button>
			<!-- 	<yu-button @click="" v-if="exportFnButton">excel导出</yu-button> -->
		</yu-toolBar>
		<div ref="tableBox" style="overflow: auto;">
			<yu-xtable :height="tbHeight" ref="refTable" row-number :data-url="dataUrl">
	<!-- 			<yu-xtable-column label="ID" prop="id" width="240px"></yu-xtable-column> -->
				<yu-xtable-column label="导入类型" data-code="IMP_TYPE" prop="impType"></yu-xtable-column>
				<yu-xtable-column label="导入渠道" data-code="IMP_CHANEL" prop="impChanel"></yu-xtable-column>
				<yu-xtable-column label="文件名称" prop="impFileName" :show-overflow-tooltip="true">
					<template slot-scope="scope">
						<a style="color:#636CE4 " href="javascipt:void(0);" @click="download(scope.row,1)">{{ scope.row.impFileName }}</a>
					</template>
				</yu-xtable-column>
				<yu-xtable-column label="导入状态" prop="impStatus" data-code="IMP_STATUS"></yu-xtable-column>
				<yu-xtable-column label="回滚文件路径" prop="impFilePath">
					<template slot-scope="scope">
						<a style="color:#636CE4 " href="javascipt:void(0);" @click="download(scope.row,2)">{{ scope.row.rollFilePath ? '下载'
							: ''}}</a>
					</template>
				</yu-xtable-column>
				<yu-xtable-column label="导入时间" prop="impTimeStr" width="150px"></yu-xtable-column>
				<yu-xtable-column label="导入内容汇总" prop="impReportSummary">
					<template slot-scope="scope">
						<!-- 					<a style="text-decoration:underline;color:#636CE4 " href="javascipt:void(0);" @click="viewFn(scope.row)">查看</a> -->
						<a style="color:#636CE4 " href="javascipt:void(0);" @click="download(scope.row,3)">{{ scope.row.impReportPath ? '下载'
							: ''}}</a>
					</template>
				</yu-xtable-column>
			</yu-xtable>
		</div>
		<yu-xdialog :title="viewTitle" :visible.sync="dialogVisible" width="800px">
			<yu-xform ref="refForm" label-width="120px">
				<yu-xform-group :column="2">
					<yu-xform-item label="内容" ctype="textarea" :disabled="disabled" colspan="24" name="msgContent" :autosize="autosize" v-model="msgContent"></yu-xform-item>
				</yu-xform-group>
			</yu-xform>
		</yu-xdialog>
	</yu-panel>

	<yu-dialog title="excel导入" :visible.sync="upLoadDialogVisible" width="400px" v-loading="excelloading">
		<yu-upload class="upload-demo" ref="my-upload" :action="upLoadUrl" accept=".xls,.xlsx" :before-upload="checkUpload" :multiple="multipleFalg"
		 :on-success="successUpload" :file-list="appUploadDatas">
			<yu-button size="small" type="primary">点击上传</yu-button>
			<a slot="tip" class="downloadcss" @click="exportDemo">模板下载</a>
			<div slot="tip" class="el-upload__tip">只能上传excel文件，且不超过100M</div>
		</yu-upload>
		<div class="uplaod-errinfo" v-if="errshow">
			<yu-tag type="danger">上传失败，错误信息如下：</yu-tag>
			<div class="uplaod-errlist">
				<yu-table :data="errdata" highlight-current-row style="width:100%" show-header>
					<yu-table-column type="index" width="50">

					</yu-table-column>
					<yu-table-column prop="errMsg" label="错误信息">

					</yu-table-column>
				</yu-table>
			</div>
		</div>
	</yu-dialog>
</div>
<style type="text/css">
	.downloadcss {
		cursor: pointer;
		margin-left: 10px;
	}
</style>